package com.web.service.impl;

import com.web.dao.BookDAO;
import com.web.dao.impl.BookDAOImpl;
import com.web.entity.Book;
import com.web.service.BookService;

import java.util.List;

/**
 * @author lenovo
 * @Description
 * @Date2025-3-13 20:13
 */
public class BookServiceImpl implements BookService {
    private BookDAO bookDAO =new BookDAOImpl();
    @Override
    public List<Book> findAllBooks(){
        return bookDAO.selectAllBooks();
    }
    @Override
    public void addBook(Book book) {
        bookDAO.insertBook(book);
    }

    @Override
    public void updateBook(Book book) {
        bookDAO.updateBook(book);
    }

    @Override
    public void removeBook(int id) {
        bookDAO.deleteBook(id);
    }
}
